﻿using RgUtility.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;


//using MemberShipModule.Bll;

namespace WanWebApplication
{
    public class LoginHelper
    {
        // private static SupplierBll supllierBll=new SupplierBll();

        /// <summary>
        /// 登录方法
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="pwd"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        public static BizResult Login(string userName, string pwd, Page page)
        {
            var br = new BizResult();

            //var user=supllierBll.GetSupplierOut(userName,pwd);
            // if (user == null)
            // {
            //     br.AddMessage("用户名、密码不正确！");
            //     br.ResultState = BizState.Warning;
            //     return br;
            // }
            // if (user.StateEnumVal==(int)SupplierState.Disable)
            // {
            //     br.AddMessage("此用户不可登录！");
            //     br.ResultState = BizState.Warning;
            //     return br;
            // }
            // if (user.StateEnumVal == (int)SupplierState.StopUse)
            // {
            //     br.AddMessage("此用户已停用！");
            //     br.ResultState = BizState.Warning;
            //     return br;
            // }
            // List<int> authroityLs = new List<int>();

            // AuthroityTool.WriteAuthroitiesToCookie((int)user.Id, user.Name,user.UserName, authroityLs);
            return br;
        }
    }
}